<!--
 * @Author: syl
 * @Date: 2023-09-20 13:46:27
 * @LastEditors: syl
 * @LastEditTime: 2023-09-22 15:52:50
 * @FilePath: \G6Doemo\g6\src\App.vue
 * @Description: 
 * 
 * Copyright (c) 2023 by junlin, All Rights Reserved. 
-->
<template>
  <div id="app">
    <div style=" margin-bottom: 20px;"><span style="margin-right: 20px;cursor: pointer;" v-for="(item,index) in tabs" :key="index" @click="tabClick(index)" :class="{active:currentIndex==index}">{{ item }}</span></div>
    <div>
      <HelloWorld msg="Welcome to Your Vue.js App" v-if="currentIndex==0"/>
      <fund v-if="currentIndex==1"></fund>
      <test v-if="currentIndex==2"></test>
    </div>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
import fund from './components/fund.vue'
import test from './components/test.vue'
export default {
  name: 'App',
  components: {
    HelloWorld,
    fund,
    test
  },
  data(){
    return{
      currentIndex:0,
      tabs:[
        '线索拓展',
        '资金研判',
        '测试'
      ]
    }
  },
  methods:{
    tabClick(index){
      this.currentIndex = index
    }
  }
}
</script>

<style>
.active{
  cursor: pointer;
  background-color: rgb(41, 170, 221);
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  transition: all 0.2s;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
